package jp.co.toshiba.ffsa.service.common;

import java.util.List;

import jp.co.toshiba.ffsa.entity.Price;

public class PriceService  extends AbstractService<Price> {

    public Price findById(String fpgaMaker,String fpgaSeries,String fpgaModel,String pkgType) {
        return select().id(fpgaMaker, fpgaSeries, fpgaModel, pkgType).getSingleResult();
    }

    public List<Price> selectAllPaged(int startIndex,int numItems){
        return findAllPaged("fpgaMaker, fpgaSeries, fpgaModel, pkgType", startIndex, numItems);
    }

    public int deleteItem(String fpgaMaker,String fpgaSeries,String fpgaModel,String pkgType) {
        Price price = findById(fpgaMaker, fpgaSeries, fpgaModel, pkgType);
        return removeItem(price);
    }

    public void updateItem(Price price){
        update(price);
    }
}